//
//  CustomButton.m
//  棒棒哒
//
//  Created by rimi on 15/8/4.
//  Copyright (c) 2015年 rimi. All rights reserved.
//

#import "CustomButton.h"

@implementation CustomButton

+ (UIButton *)buttonWithFrame:(CGRect)frame
                      Title:(NSString *)title
             BackGroudImage:(UIImage *)image
            BackGroundColor:(UIColor *)color
                  TextColor:(UIColor *)textColor
               CornerRadius:(CGFloat)radius
                BorderWidth:(CGFloat)width
                BorderColor:(UIColor *)borderColor
{
    UIButton *button = [UIButton buttonWithType:0];
    button.frame = frame;
    [button setTitle:title forState:0];
    [button setBackgroundImage:image forState:0];
    button.backgroundColor = color;
    [button setTitleColor:textColor forState:0];
    button.layer.cornerRadius = radius;
    button.layer.borderWidth = width;
    button.layer.borderColor = borderColor.CGColor;
    return button;
}








@end
